home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2000 September / maximum-cd-2000-09.iso / Power Ware Feature / RightClickMP3 / RcMP3v165.exe / RC-MP3.BAT < prev    next >
Encoding:
DOS Batch File  |  1999-08-28  |  26.1 KB  |  487 lines

  1. @echo off
  2. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  3. ::
  4. :: BE CAREFUL IF YOU MODIFY THIS FILE!
  5. :: At least make a backup copy before you do anything,
  6. :: but feel free to check it out.
  7. ::
  8. :: Mail me of you do something cool: MrShannon@execpc.com
  9. ::
  10. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  11. if %1==decod set path=%path%;c:\progra~1\Rc-MP3\
  12. :: The path must be set so the decoder can find Go32.exe ::::
  13. :: If you're getting the error "Cannot exec go32" there :::::
  14. :: is a "fix" for it later in this bat file.  keep looking ::
  15. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  16. :: setting the default values, then loading the user defined
  17. set bitrate=160
  18. set coder=Blade
  19. set priority=LOWEST
  20. set outdir=active
  21. if exist c:\progra~1\Rc-MP3\bitrate.bat call c:\progra~1\Rc-MP3\bitrate.bat
  22. if exist c:\progra~1\Rc-MP3\coder.bat call c:\progra~1\Rc-MP3\coder.bat
  23. if exist c:\progra~1\Rc-MP3\priority.bat call c:\progra~1\Rc-MP3\priority.bat
  24. if exist c:\progra~1\Rc-MP3\outdir.bat call c:\progra~1\Rc-MP3\outdir.bat
  25. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  26. :: my "plea screen" checks for a certian file.  if it's there,
  27. :: it doesn't show the screen.  Otherwise it shows the screen
  28. :: then makes the file so it doesn't sho again.
  29. if exist "c:\progra~1\Rc-MP3\Support_Rc_MP3_v1.65e.txt" goto nextj
  30. echo.
  31. echo.
  32. echo.      __________________________________________________________________
  33. echo.              THIS IS THE ONLY TIME YOU'LL SEE THIS MESSAGE
  34. echo.
  35. echo.     Please help!  Because of RightClick-MP3's sudden popularity, and the
  36. echo.     overwhelming number of downloads per week, I am going to be charged
  37. echo.     for bandwidth usages.  Please understand that my intention is for
  38. echo.     RightClick-MP3 to be free, but I need help with the bandwith charges. 
  39. echo.     If you would donate just one dollar to help me pay for the bandwith,
  40. echo.     then I can continue to make RightClick-MP3, and newer versions,
  41. echo.     available for download.
  42. echo.
  43. echo.     So if you dig RightClick-MP3, please, send me a dollar or one unit
  44. echo.     of your country's paper currency to this address:
  45. echo.                                 .
  46. echo.         MrShannon (Rc-MP3)      .     This info is also in your
  47. echo.         P.O. Box 304            .     Start button under Programs,
  48. echo.         Pewaukee, WI 53072      .     RightClick-MP3, Rc-MP3 Help
  49. echo.         USA                     .
  50. echo.
  51. echo.     My sincerest thanks!
  52. echo.
  53. echo.
  54. echo.     Please press "R" (capitol r) to indicate you've read this...
  55. :wrongchar
  56. c:\progra~1\Rc-MP3\getchar.com
  57. if errorlevel 82 if not errorlevel 83 goto gotanR
  58. goto wrongchar
  59. :gotanR
  60. cls
  61. echo. If you dig RightClick-MP3, please, send me a dollar or one unit >c:\progra~1\Rc-MP3\Support_Rc_MP3_v1.65e.txt
  62. echo. of your country's paper currency to this address: >>c:\progra~1\Rc-MP3\Support_Rc_MP3_v1.65e.txt
  63. echo. >>c:\progra~1\Rc-MP3\Support_Rc_MP3_v1.65e.txt
  64. echo.     MrShannon (Rc-MP3) >>c:\progra~1\Rc-MP3\Support_Rc_MP3_v1.65e.txt
  65. echo.     P.O. Box 304 >>c:\progra~1\Rc-MP3\Support_Rc_MP3_v1.65e.txt
  66. echo.     Pewaukee, WI 53072 >>c:\progra~1\Rc-MP3\Support_Rc_MP3_v1.65e.txt
  67. echo.     USA >>c:\progra~1\Rc-MP3\Support_Rc_MP3_v1.65e.txt
  68. echo. >>c:\progra~1\Rc-MP3\Support_Rc_MP3_v1.65e.txt
  69. echo. My sincerest thanks! >>c:\progra~1\Rc-MP3\Support_Rc_MP3_v1.65e.txt
  70. :nextj
  71. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  72. :: checks to see if we can use ANSI color.  if yes, then we
  73. :: load it, if not, then we stay in black 'n white.
  74. if exist c:\progra~1\Rc-MP3\RcMP3ans.sys c:\progra~1\Rc-MP3\RcMP3dev.com c:\progra~1\Rc-MP3\RcMP3ans.sys
  75. if NOT exist c:\progra~1\Rc-MP3\RcMP3ans.sys goto itsNT
  76. set TheOS=Win95
  77. echo.
  78. echo.       ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄           ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  79. echo.          http://execpc.com/MrShannon/              █  RightClick-MP3 v1.65  
  80. echo.              MrShannon@execpc.com                  ▀▀▌  * by MrShannon *  ▐▀▀
  81. echo.                                                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  82. echo.
  83. echo. 
  84. goto contin
  85. :itsNT
  86. set TheOS=WinNT
  87. echo.       ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄           ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  88. echo.          http://execpc.com/MrShannon/              █  RightClick-MP3 v1.65  █
  89. echo.              MrShannon@execpc.com                  ▀▀▌  * by MrShannon *  ▐▀▀
  90. echo.                                                      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  91. echo.
  92. echo.
  93. :contin
  94. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  95. :: reads in the command line switches and asigns them to
  96. :: named variables, then determins what we're doing, and
  97. :: writes that information to the screen.
  98. set mode=%1
  99. set file=%2
  100. set optn=%3
  101. if %mode%==encod set ext=mp3
  102. if %mode%==decod set ext=wav
  103. if %TheOS%==WinNT goto not95
  104. echo. Ready to %mode%e %file%
  105. if %optn%==delenc echo. and delete the .WAV when finished.
  106. if %optn%==dirdelenc echo. and delete the .WAV(s) when finished.
  107. goto finalstp
  108. :not95
  109. echo. Ready to %mode%e %file%
  110. if %optn%==delenc echo. and delete the .WAV when finished.
  111. if %optn%==dirdelenc echo. and delete the .WAV(s) when finished.
  112. echo.
  113. :finalstp
  114. if %TheOS%==Win95 echo. 
  115. if %TheOS%==WinNT echo.
  116. if NOT %mode%==decod echo.                                                     Using......... %coder%Enc.
  117. set encWvbr=nope
  118. if %bitrate%==1 set encWvbr=yep
  119. if %bitrate%==30 set encWvbr=yep
  120. if %bitrate%==50 set encWvbr=yep
  121. if %bitrate%==75 set encWvbr=yep
  122. if %bitrate%==100 set encWvbr=yep
  123. if %mode%==encod if %encWvbr%==nope echo.                                                     Bitrate is.... %bitrate%kbps.
  124. if %encWvbr%==nope goto skip
  125. if %mode%==encod if %bitrate%==1 echo.                                                     vBitrate is... Low
  126. if %mode%==encod if %bitrate%==1 echo.                                                              (Approx. 96kbps)
  127. if %mode%==encod if %bitrate%==30 echo.                                                     vBitrate is... Normal/Low
  128. if %mode%==encod if %bitrate%==30 echo.                                                              (Approx. 112kbps)
  129. if %mode%==encod if %bitrate%==50 echo.                                                     vBitrate is... Normal
  130. if %mode%==encod if %bitrate%==50 echo.                                                              (Approx. 128kbps)
  131. if %mode%==encod if %bitrate%==75 echo.                                                     vBitrate is... Normal/High
  132. if %mode%==encod if %bitrate%==75 echo.                                                              (Approx. 160kbps)
  133. if %mode%==encod if %bitrate%==100 echo.                                                     vBitrate is... High
  134. if %mode%==encod if %bitrate%==100 echo.                                                              (Approx. 192kbps)
  135. :skip
  136. if %mode%==encod if %coder%==Blade echo.                                                     Priority is... %priority%.
  137. if NOT %outdir%==active echo.
  138. if NOT %outdir%==active echo. Output Directory is... %outdir%
  139. if NOT %outdir%==active echo.
  140. if %TheOS%==Win95 echo. 
  141. if %TheOS%==WinNT echo.
  142. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  143. :: after we show the user what we're doing, we ask if they
  144. :: want to keep going, giving the opportunity to quit.
  145. echo Press any key to continue or 'X' to eXit.
  146. c:\progra~1\Rc-MP3\getchar.com
  147. if errorlevel 88 if not errorlevel 89 goto end
  148. if errorlevel 120 if not errorlevel 121 goto end
  149. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  150. :: if they made it to this point they wanna keep going, so
  151. :: we tell 'em we're doing it.
  152. cls
  153. if %TheOS%==Win95 echo. Now %mode%ing              [ RightClick-MP3 - http://execpc.com/MrShannon/ ]
  154. if NOT %TheOS%==Win95 echo. Now %mode%ing              [ RightClick-MP3 - http://execpc.com/MrShannon/ ]
  155. if %mode%==encod goto wavtomp3
  156. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  157. :: this section is for decoding an mp3 to a wav file.  The
  158. :: decoder seems to need the mp3 file to be in the same dir
  159. :: as the exe itself, so we'll have to copy the mp3 to the
  160. :: rc-mp3\ dir.  before we do that, we're gonna rename it,
  161. :: and this part determins the temp name for this copied mp3
  162. set temp_file=full
  163. if NOT exist c:\progra~1\Rc-MP3\tempE.mpx set tmp_file=tempE.mpx
  164. if NOT exist c:\progra~1\Rc-MP3\tempD.mpx set tmp_file=tempD.mpx
  165. if NOT exist c:\progra~1\Rc-MP3\tempC.mpx set tmp_file=tempC.mpx
  166. if NOT exist c:\progra~1\Rc-MP3\tempB.mpx set tmp_file=tempB.mpx
  167. if NOT exist c:\progra~1\Rc-MP3\tempA.mpx set tmp_file=tempA.mpx
  168. if NOT exist c:\progra~1\Rc-MP3\temp9.mpx set tmp_file=temp9.mpx
  169. if NOT exist c:\progra~1\Rc-MP3\temp8.mpx set tmp_file=temp8.mpx
  170. if NOT exist c:\progra~1\Rc-MP3\temp7.mpx set tmp_file=temp7.mpx
  171. if NOT exist c:\progra~1\Rc-MP3\temp6.mpx set tmp_file=temp6.mpx
  172. if NOT exist c:\progra~1\Rc-MP3\temp5.mpx set tmp_file=temp5.mpx
  173. if NOT exist c:\progra~1\Rc-MP3\temp4.mpx set tmp_file=temp4.mpx
  174. if NOT exist c:\progra~1\Rc-MP3\temp3.mpx set tmp_file=temp3.mpx
  175. if NOT exist c:\progra~1\Rc-MP3\temp2.mpx set tmp_file=temp2.mpx
  176. if NOT exist c:\progra~1\Rc-MP3\temp1.mpx set tmp_file=temp1.mpx
  177. if NOT exist c:\progra~1\Rc-MP3\temp.mpx set tmp_file=temp.mpx
  178. if tmp_file==full goto Max_tmp
  179. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  180. :: now we need to come up with a name for the file we're
  181. :: going to be making, taking into account the fact that you
  182. :: might be using an output directory...
  183. set newfile=full
  184. if NOT %outdir%==active goto nfod
  185. if NOT exist !New-30!.%ext% set newfile=!New-30!.%ext%
  186. if NOT exist !New-29!.%ext% set newfile=!New-29!.%ext%
  187. if NOT exist !New-28!.%ext% set newfile=!New-28!.%ext%
  188. if NOT exist !New-27!.%ext% set newfile=!New-27!.%ext%
  189. if NOT exist !New-26!.%ext% set newfile=!New-26!.%ext%
  190. if NOT exist !New-25!.%ext% set newfile=!New-25!.%ext%
  191. if NOT exist !New-24!.%ext% set newfile=!New-24!.%ext%
  192. if NOT exist !New-23!.%ext% set newfile=!New-23!.%ext%
  193. if NOT exist !New-22!.%ext% set newfile=!New-22!.%ext%
  194. if NOT exist !New-21!.%ext% set newfile=!New-21!.%ext%
  195. if NOT exist !New-20!.%ext% set newfile=!New-20!.%ext%
  196. if NOT exist !New-19!.%ext% set newfile=!New-19!.%ext%
  197. if NOT exist !New-18!.%ext% set newfile=!New-18!.%ext%
  198. if NOT exist !New-17!.%ext% set newfile=!New-17!.%ext%
  199. if NOT exist !New-16!.%ext% set newfile=!New-16!.%ext%
  200. if NOT exist !New-15!.%ext% set newfile=!New-15!.%ext%
  201. if NOT exist !New-14!.%ext% set newfile=!New-14!.%ext%
  202. if NOT exist !New-13!.%ext% set newfile=!New-13!.%ext%
  203. if NOT exist !New-12!.%ext% set newfile=!New-12!.%ext%
  204. if NOT exist !New-11!.%ext% set newfile=!New-11!.%ext%
  205. if NOT exist !New-10!.%ext% set newfile=!New-10!.%ext%
  206. if NOT exist !New-09!.%ext% set newfile=!New-09!.%ext%
  207. if NOT exist !New-08!.%ext% set newfile=!New-08!.%ext%
  208. if NOT exist !New-07!.%ext% set newfile=!New-07!.%ext%
  209. if NOT exist !New-06!.%ext% set newfile=!New-06!.%ext%
  210. if NOT exist !New-05!.%ext% set newfile=!New-05!.%ext%
  211. if NOT exist !New-04!.%ext% set newfile=!New-04!.%ext%
  212. if NOT exist !New-03!.%ext% set newfile=!New-03!.%ext%
  213. if NOT exist !New-02!.%ext% set newfile=!New-02!.%ext%
  214. if NOT exist !New-01!.%ext% set newfile=!New-01!.%ext%
  215. if NOT exist !New!.%ext% set newfile=!New!.%ext%
  216. goto nfend
  217. :nfod
  218. if NOT exist %outdir%\!New-30!.%ext% set newfile=%outdir%\!New-30!.%ext%
  219. if NOT exist %outdir%\!New-29!.%ext% set newfile=%outdir%\!New-29!.%ext%
  220. if NOT exist %outdir%\!New-28!.%ext% set newfile=%outdir%\!New-28!.%ext%
  221. if NOT exist %outdir%\!New-27!.%ext% set newfile=%outdir%\!New-27!.%ext%
  222. if NOT exist %outdir%\!New-26!.%ext% set newfile=%outdir%\!New-26!.%ext%
  223. if NOT exist %outdir%\!New-25!.%ext% set newfile=%outdir%\!New-25!.%ext%
  224. if NOT exist %outdir%\!New-24!.%ext% set newfile=%outdir%\!New-24!.%ext%
  225. if NOT exist %outdir%\!New-23!.%ext% set newfile=%outdir%\!New-23!.%ext%
  226. if NOT exist %outdir%\!New-22!.%ext% set newfile=%outdir%\!New-22!.%ext%
  227. if NOT exist %outdir%\!New-21!.%ext% set newfile=%outdir%\!New-21!.%ext%
  228. if NOT exist %outdir%\!New-20!.%ext% set newfile=%outdir%\!New-20!.%ext%
  229. if NOT exist %outdir%\!New-19!.%ext% set newfile=%outdir%\!New-19!.%ext%
  230. if NOT exist %outdir%\!New-18!.%ext% set newfile=%outdir%\!New-18!.%ext%
  231. if NOT exist %outdir%\!New-17!.%ext% set newfile=%outdir%\!New-17!.%ext%
  232. if NOT exist %outdir%\!New-16!.%ext% set newfile=%outdir%\!New-16!.%ext%
  233. if NOT exist %outdir%\!New-15!.%ext% set newfile=%outdir%\!New-15!.%ext%
  234. if NOT exist %outdir%\!New-14!.%ext% set newfile=%outdir%\!New-14!.%ext%
  235. if NOT exist %outdir%\!New-13!.%ext% set newfile=%outdir%\!New-13!.%ext%
  236. if NOT exist %outdir%\!New-12!.%ext% set newfile=%outdir%\!New-12!.%ext%
  237. if NOT exist %outdir%\!New-11!.%ext% set newfile=%outdir%\!New-11!.%ext%
  238. if NOT exist %outdir%\!New-10!.%ext% set newfile=%outdir%\!New-10!.%ext%
  239. if NOT exist %outdir%\!New-09!.%ext% set newfile=%outdir%\!New-09!.%ext%
  240. if NOT exist %outdir%\!New-08!.%ext% set newfile=%outdir%\!New-08!.%ext%
  241. if NOT exist %outdir%\!New-07!.%ext% set newfile=%outdir%\!New-07!.%ext%
  242. if NOT exist %outdir%\!New-06!.%ext% set newfile=%outdir%\!New-06!.%ext%
  243. if NOT exist %outdir%\!New-05!.%ext% set newfile=%outdir%\!New-05!.%ext%
  244. if NOT exist %outdir%\!New-04!.%ext% set newfile=%outdir%\!New-04!.%ext%
  245. if NOT exist %outdir%\!New-03!.%ext% set newfile=%outdir%\!New-03!.%ext%
  246. if NOT exist %outdir%\!New-02!.%ext% set newfile=%outdir%\!New-02!.%ext%
  247. if NOT exist %outdir%\!New-01!.%ext% set newfile=%outdir%\!New-01!.%ext%
  248. if NOT exist %outdir%\!New!.%ext% set newfile=%outdir%\!New!.%ext%
  249. :nfend
  250. if %newfile%==full goto Max
  251. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  252. :: now that we've found the new file's name, we can show it,
  253. :: then copy the mp3 to it temp location\name, decode the
  254. :: thing, then delete the temp file.
  255. echo. %file%
  256. echo. into %newfile%
  257. echo.
  258. echo.
  259. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  260. :::::: if you're getting the error "Cannot exec go32" ::::::
  261. :::::: delete the word "REM" from the two lines below ::::::
  262. REM copy c:\progra~1\Rc-MP3\go32.exe go32.exe >nul
  263. ::^- that is the first line ::::::::::::::::::::::::::::::::
  264. copy %file% c:\progra~1\Rc-MP3\%tmp_file% >nul
  265. call c:\progra~1\Rc-MP3\RcMP3dec.exe c:\progra~1\Rc-MP3\%tmp_file% %newfile% -wav
  266. del c:\progra~1\Rc-MP3\%tmp_file% >nul
  267. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  268. REM del go32.exe >nul
  269. ::^- that is the second line :::::::::::::::::::::::::::::::
  270. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  271. :: now that we're done decoding the mp3, we can make sure
  272. :: the decoding was sucessful, but we'll do that elsewhere
  273. goto check
  274. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  275. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  276. :: here we are, with intent on making a new mp3.  first we
  277. :: find out of we're s'posed to just encode one file or a
  278. :: whole directory, and if we're supposed to delete the wav
  279. :: files after encoding
  280. :wavtomp3
  281. if %optn%==direnc if not exist %file%\*.wav goto nowavs
  282. if %optn%==dirdelenc if not exist %file%\*.wav goto nowavs
  283. if %optn%==enc if not exist %file% goto nowavs
  284. if %optn%==delenc if not exist %file% goto nowavs
  285. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  286. :: I used to tell what the new file name was, but that got a
  287. :: bit complicated with this mode so I just snipped that out
  288. echo. %file%
  289. echo.
  290. echo.
  291. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  292. :: figure what encoder we're working with.  If it's Xing's
  293. :: MP3Encoder, we have to make up out own name for the new
  294. :: files, just like with decoding.
  295. if %coder%==Blade goto blade
  296. set newfile=full
  297. if NOT %outdir%==active goto xnfod
  298. if NOT exist !New-30!.%ext% set newfile=!New-30!.%ext%
  299. if NOT exist !New-29!.%ext% set newfile=!New-29!.%ext%
  300. if NOT exist !New-28!.%ext% set newfile=!New-28!.%ext%
  301. if NOT exist !New-27!.%ext% set newfile=!New-27!.%ext%
  302. if NOT exist !New-26!.%ext% set newfile=!New-26!.%ext%
  303. if NOT exist !New-25!.%ext% set newfile=!New-25!.%ext%
  304. if NOT exist !New-24!.%ext% set newfile=!New-24!.%ext%
  305. if NOT exist !New-23!.%ext% set newfile=!New-23!.%ext%
  306. if NOT exist !New-22!.%ext% set newfile=!New-22!.%ext%
  307. if NOT exist !New-21!.%ext% set newfile=!New-21!.%ext%
  308. if NOT exist !New-20!.%ext% set newfile=!New-20!.%ext%
  309. if NOT exist !New-19!.%ext% set newfile=!New-19!.%ext%
  310. if NOT exist !New-18!.%ext% set newfile=!New-18!.%ext%
  311. if NOT exist !New-17!.%ext% set newfile=!New-17!.%ext%
  312. if NOT exist !New-16!.%ext% set newfile=!New-16!.%ext%
  313. if NOT exist !New-15!.%ext% set newfile=!New-15!.%ext%
  314. if NOT exist !New-14!.%ext% set newfile=!New-14!.%ext%
  315. if NOT exist !New-13!.%ext% set newfile=!New-13!.%ext%
  316. if NOT exist !New-12!.%ext% set newfile=!New-12!.%ext%
  317. if NOT exist !New-11!.%ext% set newfile=!New-11!.%ext%
  318. if NOT exist !New-10!.%ext% set newfile=!New-10!.%ext%
  319. if NOT exist !New-09!.%ext% set newfile=!New-09!.%ext%
  320. if NOT exist !New-08!.%ext% set newfile=!New-08!.%ext%
  321. if NOT exist !New-07!.%ext% set newfile=!New-07!.%ext%
  322. if NOT exist !New-06!.%ext% set newfile=!New-06!.%ext%
  323. if NOT exist !New-05!.%ext% set newfile=!New-05!.%ext%
  324. if NOT exist !New-04!.%ext% set newfile=!New-04!.%ext%
  325. if NOT exist !New-03!.%ext% set newfile=!New-03!.%ext%
  326. if NOT exist !New-02!.%ext% set newfile=!New-02!.%ext%
  327. if NOT exist !New-01!.%ext% set newfile=!New-01!.%ext%
  328. if NOT exist !New!.%ext% set newfile=!New!.%ext%
  329. goto xnfend
  330. :xnfod
  331. :: this is the backwards compatibility for Xing's MP3Encoder v1.02
  332. :: to use it, you must manually edit the coder.bat file
  333. if %coder%==X3v102 goto x102nfod
  334. if NOT exist %outdir%\!New-30!.%ext% set newfile=%outdir%\!New-30!.%ext%
  335. if NOT exist %outdir%\!New-29!.%ext% set newfile=%outdir%\!New-29!.%ext%
  336. if NOT exist %outdir%\!New-28!.%ext% set newfile=%outdir%\!New-28!.%ext%
  337. if NOT exist %outdir%\!New-27!.%ext% set newfile=%outdir%\!New-27!.%ext%
  338. if NOT exist %outdir%\!New-26!.%ext% set newfile=%outdir%\!New-26!.%ext%
  339. if NOT exist %outdir%\!New-25!.%ext% set newfile=%outdir%\!New-25!.%ext%
  340. if NOT exist %outdir%\!New-24!.%ext% set newfile=%outdir%\!New-24!.%ext%
  341. if NOT exist %outdir%\!New-23!.%ext% set newfile=%outdir%\!New-23!.%ext%
  342. if NOT exist %outdir%\!New-22!.%ext% set newfile=%outdir%\!New-22!.%ext%
  343. if NOT exist %outdir%\!New-21!.%ext% set newfile=%outdir%\!New-21!.%ext%
  344. if NOT exist %outdir%\!New-20!.%ext% set newfile=%outdir%\!New-20!.%ext%
  345. if NOT exist %outdir%\!New-19!.%ext% set newfile=%outdir%\!New-19!.%ext%
  346. if NOT exist %outdir%\!New-18!.%ext% set newfile=%outdir%\!New-18!.%ext%
  347. if NOT exist %outdir%\!New-17!.%ext% set newfile=%outdir%\!New-17!.%ext%
  348. if NOT exist %outdir%\!New-16!.%ext% set newfile=%outdir%\!New-16!.%ext%
  349. if NOT exist %outdir%\!New-15!.%ext% set newfile=%outdir%\!New-15!.%ext%
  350. if NOT exist %outdir%\!New-14!.%ext% set newfile=%outdir%\!New-14!.%ext%
  351. if NOT exist %outdir%\!New-13!.%ext% set newfile=%outdir%\!New-13!.%ext%
  352. if NOT exist %outdir%\!New-12!.%ext% set newfile=%outdir%\!New-12!.%ext%
  353. if NOT exist %outdir%\!New-11!.%ext% set newfile=%outdir%\!New-11!.%ext%
  354. if NOT exist %outdir%\!New-10!.%ext% set newfile=%outdir%\!New-10!.%ext%
  355. if NOT exist %outdir%\!New-09!.%ext% set newfile=%outdir%\!New-09!.%ext%
  356. if NOT exist %outdir%\!New-08!.%ext% set newfile=%outdir%\!New-08!.%ext%
  357. if NOT exist %outdir%\!New-07!.%ext% set newfile=%outdir%\!New-07!.%ext%
  358. if NOT exist %outdir%\!New-06!.%ext% set newfile=%outdir%\!New-06!.%ext%
  359. if NOT exist %outdir%\!New-05!.%ext% set newfile=%outdir%\!New-05!.%ext%
  360. if NOT exist %outdir%\!New-04!.%ext% set newfile=%outdir%\!New-04!.%ext%
  361. if NOT exist %outdir%\!New-03!.%ext% set newfile=%outdir%\!New-03!.%ext%
  362. if NOT exist %outdir%\!New-02!.%ext% set newfile=%outdir%\!New-02!.%ext%
  363. if NOT exist %outdir%\!New-01!.%ext% set newfile=%outdir%\!New-01!.%ext%
  364. if NOT exist %outdir%\!New!.%ext% set newfile=%outdir%\!New!.%ext%
  365. goto xnfend
  366. :: the rest of the backwards compatibility
  367. :x102nfod
  368. if NOT exist %outdir%\!New-30!.%ext% set newfile=!New-30!.%ext%
  369. if NOT exist %outdir%\!New-29!.%ext% set newfile=!New-29!.%ext%
  370. if NOT exist %outdir%\!New-28!.%ext% set newfile=!New-28!.%ext%
  371. if NOT exist %outdir%\!New-27!.%ext% set newfile=!New-27!.%ext%
  372. if NOT exist %outdir%\!New-26!.%ext% set newfile=!New-26!.%ext%
  373. if NOT exist %outdir%\!New-25!.%ext% set newfile=!New-25!.%ext%
  374. if NOT exist %outdir%\!New-24!.%ext% set newfile=!New-24!.%ext%
  375. if NOT exist %outdir%\!New-23!.%ext% set newfile=!New-23!.%ext%
  376. if NOT exist %outdir%\!New-22!.%ext% set newfile=!New-22!.%ext%
  377. if NOT exist %outdir%\!New-21!.%ext% set newfile=!New-21!.%ext%
  378. if NOT exist %outdir%\!New-20!.%ext% set newfile=!New-20!.%ext%
  379. if NOT exist %outdir%\!New-19!.%ext% set newfile=!New-19!.%ext%
  380. if NOT exist %outdir%\!New-18!.%ext% set newfile=!New-18!.%ext%
  381. if NOT exist %outdir%\!New-17!.%ext% set newfile=!New-17!.%ext%
  382. if NOT exist %outdir%\!New-16!.%ext% set newfile=!New-16!.%ext%
  383. if NOT exist %outdir%\!New-15!.%ext% set newfile=!New-15!.%ext%
  384. if NOT exist %outdir%\!New-14!.%ext% set newfile=!New-14!.%ext%
  385. if NOT exist %outdir%\!New-13!.%ext% set newfile=!New-13!.%ext%
  386. if NOT exist %outdir%\!New-12!.%ext% set newfile=!New-12!.%ext%
  387. if NOT exist %outdir%\!New-11!.%ext% set newfile=!New-11!.%ext%
  388. if NOT exist %outdir%\!New-10!.%ext% set newfile=!New-10!.%ext%
  389. if NOT exist %outdir%\!New-09!.%ext% set newfile=!New-09!.%ext%
  390. if NOT exist %outdir%\!New-08!.%ext% set newfile=!New-08!.%ext%
  391. if NOT exist %outdir%\!New-07!.%ext% set newfile=!New-07!.%ext%
  392. if NOT exist %outdir%\!New-06!.%ext% set newfile=!New-06!.%ext%
  393. if NOT exist %outdir%\!New-05!.%ext% set newfile=!New-05!.%ext%
  394. if NOT exist %outdir%\!New-04!.%ext% set newfile=!New-04!.%ext%
  395. if NOT exist %outdir%\!New-03!.%ext% set newfile=!New-03!.%ext%
  396. if NOT exist %outdir%\!New-02!.%ext% set newfile=!New-02!.%ext%
  397. if NOT exist %outdir%\!New-01!.%ext% set newfile=!New-01!.%ext%
  398. if NOT exist %outdir%\!New!.%ext% set newfile=!New!.%ext%
  399. goto xnfend
  400. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  401. :: now that we have the new file's name, we can print that
  402. :: to the screen, then figure out what the command line
  403. :: arguments should be.  after that, depending on if we're
  404. :: encoding one file or a whole directory, if we're supposed
  405. :: to delete the wav's afterward or not, or some combo, we
  406. :: decide now to run x3enc.exe
  407. :xnfend
  408. if %newfile%==full goto Max
  409. set arg=-b %bitrate%000
  410. if %bitrate%==1 set arg=-v1
  411. if %bitrate%==30 set arg=-v30
  412. if %bitrate%==50 set arg=-v50
  413. if %bitrate%==75 set arg=-v75
  414. if %bitrate%==100 set arg=-v100
  415. if %optn%==enc call c:\progra~1\Rc-MP3\x3enc.exe %file% %newfile% %arg%
  416. if %optn%==enc if %coder%==X3v102 if NOT %outdir%==active move %newfile% "%outdir%\"
  417. if %optn%==delenc call c:\progra~1\Rc-MP3\x3enc.exe %file% %newfile% %arg%
  418. if %optn%==delenc if %coder%==X3v102 if NOT %outdir%==active move %newfile% "%outdir%\"
  419. if %optn%==delenc del %file%
  420. if %optn%==direnc if %outdir%==active call c:\progra~1\Rc-MP3\x3enc.exe %file% %file% %arg%
  421. if %optn%==direnc if NOT %outdir%==active call c:\progra~1\Rc-MP3\x3enc.exe %file% %outdir% %arg%
  422. if %optn%==dirdelenc if %outdir%==active call c:\progra~1\Rc-MP3\x3enc.exe %file% %file% %arg%
  423. if %optn%==dirdelenc if NOT %outdir%==active call c:\progra~1\Rc-MP3\x3enc.exe %file% %outdir% %arg%
  424. if %optn%==dirdelenc del %file%\*.wav
  425. goto end
  426. :blade
  427. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  428. :: BladeEnc is lots easier to code for than x3enc.  Blade
  429. :: does almost everything on it's own.  All we have to do is
  430. :: tell BladeEnc what it is we wanna do, and it does the rest
  431. if %optn%==enc if %outdir%==active call c:\progra~1\Rc-MP3\BladeEnc.exe -%bitrate% -PRIO=%priority% -QUIT %file%
  432. if %optn%==enc if NOT %outdir%==active call c:\progra~1\Rc-MP3\BladeEnc.exe -%bitrate% -PRIO=%priority% -QUIT -OUTDIR=%outdir% %file%
  433. if %optn%==delenc if %outdir%==active call c:\progra~1\Rc-MP3\BladeEnc.exe -%bitrate% -PRIO=%priority% -QUIT -DELETE %file%
  434. if %optn%==delenc if NOT %outdir%==active call c:\progra~1\Rc-MP3\BladeEnc.exe -%bitrate% -PRIO=%priority% -QUIT -DELETE -OUTDIR=%outdir% %file%
  435. if %optn%==direnc if %outdir%==active call c:\progra~1\Rc-MP3\BladeEnc.exe -%bitrate% -PRIO=%priority% -QUIT %file%\*.wav
  436. if %optn%==direnc if NOT %outdir%==active call c:\progra~1\Rc-MP3\BladeEnc.exe -%bitrate% -PRIO=%priority% -QUIT -OUTDIR=%outdir% %file%\*.wav
  437. if %optn%==dirdelenc if %outdir%==active call c:\progra~1\Rc-MP3\BladeEnc.exe -%bitrate% -PRIO=%priority% -QUIT -DELETE %file%\*.wav
  438. if %optn%==dirdelenc if NOT %outdir%==active call c:\progra~1\Rc-MP3\BladeEnc.exe -%bitrate% -PRIO=%priority% -QUIT -DELETE -OUTDIR=%outdir% %file%\*.wav
  439. goto end
  440. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  441. :: I had this seperate because when I used L3Encode to make
  442. :: the mp3's, I used to check for those too, but I don't do
  443. :: that anymore because and I just don't wanna move it around
  444. :check
  445. if NOT exist %newfile% pause
  446. goto end
  447. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  448. :: this is what we'll show if we were unable to come up with
  449. :: a temporary file name for the mp3 when trying to decode.
  450. :Max_tmp
  451. echo.
  452. echo.
  453. echo.     I am sorry but you cannot decode more than 15 mp3's at a time.
  454. echo.
  455. echo.
  456. echo.  Press any key to close this window...
  457. c:\progra~1\Rc-MP3\getchar.com
  458. goto end
  459. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  460. :: this is what we'll show if we were unable to come up with
  461. :: a file name for the new wav or mp3.  maximunm of 30 files
  462. :Max
  463. echo.
  464. echo.
  465. echo.     I am sorry but you must rename some of the !New-##!.%ext% files before I can continue.
  466. echo.
  467. echo.
  468. echo.  Press any key to close this window...
  469. c:\progra~1\Rc-MP3\getchar.com
  470. goto end
  471. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  472. :: pretty self explanitory.
  473. :nowavs
  474. echo.
  475. echo.
  476. echo.     No .WAV files were found here to encode.
  477. echo.
  478. echo.
  479. echo.                                        Press any key to close this window...
  480. c:\progra~1\Rc-MP3\getchar.com
  481. goto end
  482. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  483. :: now that we're done, we can "turn off" the color ANSI if
  484. :: it was loaded, then use exit to close the dos session.
  485. :end
  486. if %TheOS%==Win95 echo 
  487. exit